package com.guigu.buy.service.impl;

import com.guigu.buy.pojo.SysRole;
import com.guigu.buy.pojo.SysUser;
import com.guigu.buy.mapper.SysUserMapper;
import com.guigu.buy.service.ISysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author com.guigu
 * @since 2024-05-15
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;
    public List<SysRole> getRoleByUserId(SysUser sysUser) {
        return sysUserMapper.getRoleByUserIds(sysUser.getId());
    }
}
